home *** CD-ROM | disk | FTP | other *** search
- Path: lll-winken.llnl.gov!usenet
- From: Scott Nelson <nelson18@llnl.gov>
- Newsgroups: comp.sys.sgi.apps,comp.lang.c++
- Subject: Re: SGI's C++ compiler and the boolean type
- Date: Thu, 18 Apr 1996 20:08:00 -0700
- Organization: Lawrence Livermore National Laboratory
- Message-ID: <31770390.2781@llnl.gov>
- References: <4kefm7$oao@ncar.ucar.edu> <4kg6fv$h7k@nic.ftns.no>
- NNTP-Posting-Host: canopus.llnl.gov
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.01 (X11; U; IRIX64 6.1 IP26)
-
- Arthur Hagen wrote:
- >
- > >
- > > typedef int bool;
- > > #define true 1
- > > #define false 0
- >
- > And some argue that true should be -1, because then bitwise not works:
- >
-
- We use the following. It's safe on all platforms:
-
- #define FALSE 0
- #define TRUE (!0)
-
- Let the built-in ! operator determine what TRUE really is.
-
- Scott Nelson
-